#include "EditorStatusBarViewModel.h"

#include "EditorStatusBarModel.h"

#include "EditorStatusItemModel.h"
#include "EditorStatusItemViewModel.h"

#include "Framework/Editor.h"

void REditorStatusBarViewModel::BindModel(TSharedObjectPtr<REditorStatusBarModel> InModel)
{
    BaseModel=InModel;

    for (int i = 0; i < BaseModel->Items.Num(); ++i)
    {
        TSharedObjectPtr<REditorStatusItemViewModel> ItemViewModel=NewObject<REditorStatusItemViewModel>(
             REditor::Get()->GetViewModelClass(BaseModel->Items[i]->GetClass())
             ,this);
        ItemViewModel->BindModel(BaseModel->Items[i]);
        Items.Add(ItemViewModel);
    }

}